home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19950528-19950726
/
000389_news@columbia.edu_Tue Jul 18 08:06:39 1995.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA07776
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Tue, 18 Jul 1995 15:43:25 -0400
Received: by apakabar.cc.columbia.edu id AA27533
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Tue, 18 Jul 1995 15:43:22 -0400
Path: news.columbia.edu!news.cs.columbia.edu!news.nyc.pipeline.com!newsjunkie.ans.net!howland.reston.ans.net!news.nic.surfnet.nl!sun4nl!news.iaf.nl!news.vcd.nl!news
From: harry@vcd.nl (Harry Venema)
Newsgroups: comp.unix.programmer,comp.protocols.kermit.misc
Subject: Re: dialing program; modem receives dialstring but doesn't dial?
Date: 18 Jul 1995 08:06:39 GMT
Organization: VCD Automatisering B.V, Groningen, the Netherlands
Lines: 49
Message-Id: <3ufq2f$1lh@vcd.nl>
References: <3ue63g$g3n@cnj.digex.net>
Nntp-Posting-Host: viper.vcd.nl
Mime-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.5
Xref: news.columbia.edu comp.unix.programmer:32383 comp.protocols.kermit.misc:3225
Apparently-To: kermit.misc@watsun.cc.columbia.edu
In article <3ue63g$g3n@cnj.digex.net>, hashmi@cnj.digex.net says...
>
>
>
>Hi,
>
>I have a simple program to dial out via a hayes modem. When run, the
>modem RD and TD lights blink showing that it receives the dial string
>from the program but doesn't really dial out.
>Here is the relevant piece of code. Any help is appreciated.
>Thanks
>
>Atiq
>-------------------------------------
[ source deleted ]
>main()
>{
> int tty_fd;
> tty_fd=open(....) etc.
> sttyModem(tty_fd);
>
> char *str="ATDT91(800)222-3333\r"; //some number
> char ss[10];
>
> write(tty_fd, str, strlen(str));
> read(tty_fd, ss, 1);
> // other code..........
> exit(0);
>}
I had the same problem a few years ago.
Some modems don't like receiving an AT command at full speed.
I solved the problem bij sending each character seperate and waiting for the
output to drain by using the ioctl command.
Change your single write into a loop where each character is written seperately
followed by ioctl(tty_fd,TCSBRK,1).
Harry Venema
--
---------------------------------------------------------------------------
Harry Venema | VCD Services B.V
email work: harry@vcd.nl | Osloweg 131
home: harry@pyrrus.iaf.nl | 9723 BK Groningen, the Netherlands
#include <stddisclaimer.h> | Voice +31 50 975500 Fax: +31 50 975597
---------------------------------------------------------------------------